package com.lc1993929.petserver.entity;

import lombok.Data;

@Data
public class Result<T> {

    private String status;

    private Integer code;
    private String msg;

    private T data;

    public static <D> Result<D> ok(D d) {
        Result<D> result = new Result<D>();
        result.status = "success";
        result.code = 200;
        result.data = d;
        result.msg = "成功";

        return result;
    }
}
